package cn.edu.lingnan.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.lingnan.dao.OrgDAO;

public class oNameCheckServler extends HttpServlet {
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String oname=req.getParameter("oname");
		OrgDAO o=new OrgDAO();
		boolean flag=o.findByName(oname);
		System.out.println(flag);
		if(flag)
			resp.getWriter().print("true");
		else
			resp.getWriter().print("false");
	}
}
